package com.example.stylecameraversion01;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;

public class ActivityMain extends Activity {
	Button btnPicture, btnVideo, btnSetting, btnExit, btnGallery;
	private static final int REQUEST_CODE = 1888;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.layout_main);
		init();
		handle();
	}

	private void init() {
		// TODO Auto-generated method stub
		btnPicture = (Button) findViewById(R.id.btnTakePhoto);

		btnVideo = (Button) findViewById(R.id.btnMakeVideo);

		btnGallery = (Button) findViewById(R.id.btnGallery);
		
		btnSetting = (Button) findViewById(R.id.btnSetting);
		
		btnExit = (Button) findViewById(R.id.btnExit);
	}

	private void handle() {
		// TODO Auto-generated method stub
		btnPicture.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intentPhoto = new Intent(v.getContext(),
						ActivityCapture.class);

				startActivity(intentPhoto);
			}
		});

		btnGallery.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intentGalery= new Intent(v.getContext(),
						ActivityGallery.class);

				startActivity(intentGalery);
			}
		});

		btnVideo.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intentVideo = new Intent(v.getContext(),
						ActivityVideoCapture.class);
				startActivity(intentVideo);
			}
		});
		
		btnSetting.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				
			}
		});
		
		btnExit.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				System.exit(0);
			}
		});
	}

	
}
